-- GENERATED SPELL FOR [Scarshield Acolyte] --


function spell0_9045(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(12039,pUnit)
pUnit:RegisterEvent('Sorts_9045', 3000, 1)
end

function spell1_9045(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(8362,pUnit)
pUnit:RegisterEvent('Sorts_9045', 22000, 1)
end

function spell2_9045(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(14032,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9045', 18000, 1)
end

function Sorts_9045(pUnit, Event)
local choix_sorts_9045 = math.random(0, 2)
if choix_sorts_9045 == 0 then
pUnit:RegisterEvent('spell0_9045', 1, 1)
end
if choix_sorts_9045 == 1 then
pUnit:RegisterEvent('spell1_9045', 1, 1)
end
if choix_sorts_9045 == 2 then
pUnit:RegisterEvent('spell2_9045', 1, 1)
end
end

function mob9045_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9045', math.random(1500, 3000), 1)
end

function mob9045_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9045_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9045_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9045, 1, 'mob9045_Action')
RegisterUnitEvent(9045, 2, 'mob9045_Leave')
RegisterUnitEvent(9045, 3, 'mob9045_Kill')
RegisterUnitEvent(9045, 4, 'mob9045_Die')
